#include<stdio.h>
int fbnq(int n)
{
	int a = 1;
	int b = 1;
	int c = 0;
	if (n <= 2)
		return 1;
	else
	{
		for (int u = 1; u <= n - 2; u++)
		{
			c = a + b;
			a = b;
			b = c;
		}
		return c;
	}
}

int main()
{
	int i = 0;
	scanf("%d", &i);
	int ret = fbnq(i);
	printf("%d", ret);
	return 0;
}
